<?php

namespace app\api\model;

use app\common\model\UserAuth as Model;

class UserAuth extends Model
{
    public function add($data)
    {
        // if(empty(self::getAuthDetail($data['user_id']))){
        //     $this->error = '认证资料已存在';
        //     return false;
        // }
        $data['wxapp_id'] = self::$wxapp_id;
        return $this->allowField(true)->save($data);
    }
}